from threading import Thread
import time
g_num = []

def work1():
    for i in range(3):
        g_num.append(i)

    print("work1:",g_num)
    print("work1:%s"%str(g_num))
def work2():

    print("work2:%s"%str(g_num))




if __name__ == "__main__":
    print("主进程:",g_num)
    t1 = Thread(target=work1)
    t1.start()
    time.sleep(1)
    t2 = Thread(target=work2)
    t2.start()
